﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="jnlamp.Web.LoginAdmin" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>杀虫灯系统平台</title>
    <link href="CSS/Index.css" rel="stylesheet" />
    <script src="Script/easyui/jquery.min.js"></script>
    <style>
        html,body {height:100%;width:100%;}         
        .bg {
            background: url(images/bg.jpg);
            filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";
            -moz-background-size: 100% 100%;
            background-size: 100% 100%;
           height:auto;min-height:100%;
           width:auto;min-width:100%;
        }
         .title {
            padding-top:150px;
            width:577px;
            margin:0 auto;
            
        }
        .gdtitle {
            float:right;
            /*background: url(images/title.png);*/
            height:89px;
            width:577px;
        }
        input,img{vertical-align:middle;}
       .divbox {display:inline; width:600px; vertical-align:middle; height:30px;  position:absolute;    left:50%;    top:50%;    margin-left:-300px;    margin-top:-20px; }
    </style>
    <script language="javascript">
        function mobile_device_detect(url) {
            var thisOS = navigator.platform;
            var os = new Array("iPhone", "iPod", "iPad", "android", "Nokia", "SymbianOS", "Symbian", "Windows Phone", "Phone", "Linux armv71", "MAUI", "UNTRUSTED/1.0", "Windows CE", "BlackBerry", "IEMobile");
            for (var i = 0; i < os.length; i++) {
                if (thisOS.match(os[i])) {
                    window.location = url;
                }

            }
            //因为相当部分的手机系统不知道信息,这里是做临时性特殊辨认
            if (navigator.platform.indexOf('iPad') != -1) {
                window.location = url;
            }
            //做这一部分是因为Android手机的内核也是Linux
            //但是navigator.platform显示信息不尽相同情况繁多,因此从浏览器下手，即用navigator.appVersion信息做判断
            var check = navigator.appVersion;
            if (check.match(/linux/i)) {
                //X11是UC浏览器的平台 ，如果有其他特殊浏览器也可以附加上条件
                if (check.match(/mobile/i) || check.match(/X11/i)) {
                    window.location = url;
                }
            }
            //类in_array函数
            Array.prototype.in_array = function (e) {
                for (i = 0; i < this.length; i++) {
                    if (this[i] == e)
                        return true;
                }
                return false;
            }
        }

        function CheckForm() {
            if ($('#txtName').val() == "") {
                alert("请输入用户名！");
                document.Login.yhm.focus();
                return false;
            }
            if ($('#txtName').val() == "用户名") {
                alert("请输入用户名！");
                return false;
            }
            if ($('#txtPwd').val() == "") {
                alert("请输入密码！");
                document.Login.mima.focus();
                return false;
            }
            if ($('#txtPwd').val() == "密码") {
                alert("请输入密码！");
                return false;
            }
            if ($('#txtCode').val() == "") {
                alert("请输入您的验证码！");
                return (false);
            }
            if ($('#txtCode').val() == "验证码") {
                alert("请输入您的验证码！");
                return (false);
            }
        }
        function changetxtf(s, t, c) {
            if ($(s).val() == t) {
                $(s).val("");
                $(s).attr("class", c);
            }
        }
        function changetxtb(s, t, c) {
            if ($(s).val() == "") {
                $(s).val(t);
                $(s).attr("class", c);
            }
        }
        $(function () {
            mobile_device_detect("mobile/index.html");

        });

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div align="center" class="bg">
            <div id="title" class="title">                
                <div class="gdtitle">
                </div>                
            </div>
            <div class="divbox">
                
                <asp:TextBox ID="txtName" CssClass="txt" runat="server" Text="用户名" onfocus="changetxtf(this,'用户名','txt1')" onblur="changetxtb(this,'用户名','txt')"></asp:TextBox>
                <asp:TextBox ID="txtPwd" CssClass="txt"  runat="server" Text="密码" onfocus="changetxtf(this,'密码','txt1')" onblur="changetxtb(this,'密码','txt')" TextMode="Password"></asp:TextBox>
                <span>&nbsp;</span>               
                <asp:CheckBox runat="server" ID="chkpwd" name="jzmm" value="1" Text="记住密码" />

                <asp:ImageButton  src="/images/dl.jpg" ID="ImageButton1" runat="server" OnClick="btnLogin_Click" />

                <img id="ImageButton2" src="/images/qx.jpg"  />                
            </div>
        </div>


    </form>
</body>
</html>
